//
//  Factory.m
//  BaseProject
//
//  Created by mac on 2020/12/21.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "Factory.h"

@implementation Factory
+ (NSString *)getMonthDayHourMinute:(NSString *)createTime
{
    //2020-10-10 12:12:22
    NSArray *array = [createTime componentsSeparatedByString:@" "];
    if (array.count == 2) {
        NSString *fstr = array.firstObject;
        NSString *sstr = array.lastObject;
        NSArray *fArray = [fstr componentsSeparatedByString:@"-"];
        NSArray *sArray = [sstr componentsSeparatedByString:@":"];
        if (fArray.count == 3 && sArray.count == 3) {
            return [NSString stringWithFormat:@"%@月%@日 %@:%@",fArray[1],fArray[2],sArray.firstObject,sArray[1]];
        }
    }
    return createTime;
}
@end
